﻿@using Abp.Extensions
@using Magicodes.Admin.Web.Areas.Admin.Models.Common.Modals
@using Magicodes.WeChat.Web.Models.WeChatUsers
@model CreateOrEditWeChatUserModalViewModel

@Html.Partial("~/Areas/Admin/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel((Model.IsEditMode ? L("Edit") : L("CreateNew")) + L("WeChatUser")))

<div class="modal-body">
    <form name="WeChatUserInformationsForm" role="form" novalidate class="form-validation">
        @if (Model.IsEditMode)
        {
            <input type="hidden" name="Id" value="@Model.WeChatUser.Id"/>
        }
        <div class="row">
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint form-md-checkboxes">
                    <div class="md-checkbox-inline">
                        <div class="md-checkbox">
                            <input type="checkbox" name="Subscribe" id="Subscribe" @(Model.WeChatUser.Subscribe?"checked=\"checked\"":"") class="md-check" value="True">
                            <label for="Subscribe" style="color:gray;">
                                <span class="inc"></span>
                                <span class="check"></span>
                                <span class="box"></span>
                                @L("Subscribe")
                            </label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="NickName" class="form-control@(Model.WeChatUser.NickName.IsNullOrEmpty() ? "" : " edited")" required value="@Model.WeChatUser.NickName" >
                    <label for="NickName">@L("NickName")</label>
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="City" class="form-control@(Model.WeChatUser.City.IsNullOrEmpty() ? "" : " edited")"  value="@Model.WeChatUser.City" >
                    <label for="City">@L("City")</label>
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="Country" class="form-control@(Model.WeChatUser.Country.IsNullOrEmpty() ? "" : " edited")"  value="@Model.WeChatUser.Country" >
                    <label for="Country">@L("Country")</label>
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="Province" class="form-control@(Model.WeChatUser.Province.IsNullOrEmpty() ? "" : " edited")"  value="@Model.WeChatUser.Province" >
                    <label for="Province">@L("Province")</label>
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="Language" class="form-control@(Model.WeChatUser.Language.IsNullOrEmpty() ? "" : " edited")"  value="@Model.WeChatUser.Language" >
                    <label for="Language">@L("Language")</label>
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="HeadImgUrl" class="form-control@(Model.WeChatUser.HeadImgUrl.IsNullOrEmpty() ? "" : " edited")"  value="@Model.WeChatUser.HeadImgUrl" >
                    <label for="HeadImgUrl">@L("HeadImgUrl")</label>
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList(
                                    "UnionId",
                                    ViewBag.UnionId as IEnumerable<SelectListItem>,
                                    new
                                    {
                                        @class = "form-control ",
                                        data_live_search = "true",
                                        id = "UnionIdSelectionCombobox"
                                    })
                    <label for="UnionId">@L("Union")</label>
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="Remark" class="form-control@(Model.WeChatUser.Remark.IsNullOrEmpty() ? "" : " edited")"  value="@Model.WeChatUser.Remark" >
                    <label for="Remark">@L("Remark")</label>
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="Sex" class="form-control " value="@Model.WeChatUser.Sex" >
                    <label for="Sex">@L("Sex")</label>
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList(
                                    "GroupId",
                                    ViewBag.GroupId as IEnumerable<SelectListItem>,
                                    new
                                    {
                                        @class = "form-control ",
                                        data_live_search = "true",
                                        id = "GroupIdSelectionCombobox"
                                    })
                    <label for="GroupId">@L("Group")</label>
                </div>
            </div>
        </div>
    </form>
</div>

@Html.Partial("~/Areas/Admin/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")